% 
%  chapter2.tex
%  ThesisDIFCTUNL
%  
%  Created by João Lourenço on 2010-03-14.
%  Copyright 2010 DI-FCT-UNL. All rights reserved.
%
\chapter*{ThesisDIFCTNL User's Manual}
\label{cha:users_manual}

% ================
% = Introduction =
% ================
\section{Introduction} % (fold)
\label{sec:introduction}

This chapter describes how to use the \LaTeX{} style thesis{}. This style file is a major rewrite from a previous style used in our Department, which was in turn adapted from a style file from the University of Pernambuco, Brazil.  We aimed at providing an improved visual layout and, simultaneously, a \emph{very easy to use} template (aka, a \LaTeX{} template for dummies). ;)

\noindent%
\fbox{%
\begin{minipage}{\linewidth}
	The first main rule you must know is that \textbf{you must} specify the encoding of your text files. A simple \emph{rule of thumb} is: if you are using Windows add ``latin1'' to the list of package options; if you are using other systems, such as Linux or Mac OSx, add ``utf8'' to the list of package options.
\end{minipage}%
}
% section introduction (end)

% ====================
% = Folder Structure =
% ====================
\section{Folder Structure} % (fold)
\label{sec:folder_structure}

The template file for writing dissertations in \LaTeX{} if organized into a main directory and a set of files and sub-directories:
\begin{description}
	\item[ThesisDIFCTUNL] This is the main directory and includes:
	\begin{description}
		\item[Logo] Directory with University logos;
		\item[Scripts] Directory with useful bash scripts, e.g., for cleaning all temporary files;
		\item[User] Directory where to put user files (text and figures);
		\item[alpha-pt.bst] A file with bibliographic names in portuguese, e.g., ``Relatório Técnico'' e ``Tese de Doutoramento'' instead of ``Technical Report'' and ``PhD Thesis.'' This file is used automatically if Portuguese is selected as the main language (see below);
		\item[defaults.tex] A file with the main default values for the package (institution name, degree name and similars);
		\item[template.tex] The main file. You should run \LaTeX{} in this one. Please refrain from changing the file content outside of the well defined area;
		\item[thesisdifctunl.cls] The \LaTeX{} class file for the thesis{} style. Currently, some of the defaults are stored here instead of \texttt{defaults.tex}. This file should not be changed, unless you'er ready to play with fire! :)
	\end{description}
\end{description}

Again, we would like to recall that all the user \LaTeX{} files should be stored in the \texttt{User} directory, and all the images in \texttt{User/Figures} directory.\todo[inline]{Yet another note!}
% section folder_structure (end)

% ===================
% = Package options =
% ===================
\section{Package Options} % (fold)
\label{sec:package_options}

The thesis{} style includes the following options, that must be included in the options list in the \verb!\documentclass[options]{thesisdifctunl}! line at the top of the \texttt{texplate.tex} file.

The list below aggregates related options in a single item. For each list, the default value is prefixed with a *.

\subsection{Language Related Options} % (fold)
\label{sub:language_related_options}

You must choose the main language for the document. The available options are:

\begin{enumerate}
	\item \textbf{pt} --- The text is written in Portuguese (with a small abstract in English).
	\item \textbf{*en} --- The text is written in English (with a small abstract in Portuguese).
\end{enumerate}

The language option affects:
\begin{itemize}
	\item \textbf{The order of the summaries.} First the abstract in the main language and then in the foreign language. This means that if your main language for the document in english, you will see first the abstract (in english) and then the ``resumo'' (in portuguese). If you switch the main language for the document, it will also automatically switch the order of the summaries.
	\item \textbf{The names for document sectioning.} E.g., ``Chapter'' vs.\ ``Capítulo'', ``Table of Contents'' vs.\ ``Índice'', ``Figure'' vs.\ ``Figura'', etc.
	\item \textbf{The type of documents in the bibliogrpahy.} E.g., ``Technical Report'' vs.\ ``Relatório Técnico'', ``PhD Thesis'' vs.\ ``Tese de Doutoramento'', etc.
\end{itemize} 

No mater which language you chose, you will always have the appropriate hyphenation rules according to the language at that point. You always get portuguese hyphenation rules in the ``Resumo'', english hyphenation rules in the ``Abstract'', and then the main language hyphenation rules for the rest of the document.
% section package_options (end)

\subsection{Class of Text} % (fold)
\label{sub:class_of_text}

You must choose the class of text for the document. The available options are:

\begin{enumerate}
	\item \textbf{bsc} --- BSc graduation report.
	\item \textbf{*prepmsc} --- Preparation of MSc dissertation. This is a preliminary report graduate students at DI-FCT-UNL must prepare to conclude the first semester of the two-semesters MSc work. The files specified by \verb!\dedicatoryfile! and \verb!\acknowledgmentsfile! are ignored, even if present, for this class of document.
	\item \textbf{msc} --- MSc dissertation.
	\item \textbf{propphd} ---  Proposal for a PhD work. The files specified by \verb!\dedicatoryfile! and \verb!\acknowledgmentsfile! are ignored, even if present, for this class of document.
	\item \textbf{prepphd} ---  Preparation of a PhD thesis. This is a preliminary report PhD students at DI-FCT-UNL must prepare before the end of the third semester of PhD work. The files specified by \verb!\dedicatoryfile! and \verb!\acknowledgmentsfile! are ignored, even if present, for this class of document.
	\item \textbf{phd} --- PhD dissertation.
\end{enumerate}
% subsection class_of_text (end)

% ============
% = Printing =
% ============
\subsection{Printing} % (fold)
\label{sub:printing}

You must choose how your document will be printed. The available options are:
\begin{enumerate}
	\item \textbf{oneside} --- Single side page printing.
	\item \textbf{*twoside} --- Double sided page printing.
\end{enumerate}
% subsection printing (end)

% =============
% = Font Size =
% =============
\subsection{Font Size} % (fold)
\label{ssec:font_size}

You must select the encoding for your text. The available options are:
\begin{enumerate}
	\item \textbf{11pt} --- Eleven (11) points font size.
	\item \textbf{*12pt} --- Twelve (12) points font size. You should really stick to 12pt\ldots
\end{enumerate}
% subsection font_size (end)

% =================
% = Text encoding =
% =================
\subsection{Text Encoding} % (fold)
\label{ssec:text_encoding}

You must choose the font size for your document. The available options are:
\begin{enumerate}
	\item \textbf{latin1} --- Use Latin-1 (\href{http://en.wikipedia.org/wiki/ISO/IEC_8859-1}{ISO 8859-1}) encoding.  Most probably you should use this option if you use Windows;
	\item \textbf{utf8} --- Use \href{http://en.wikipedia.org/wiki/UTF-8}{UTF8} encoding.    Most probably you should use this option if you are not using Windows.
\end{enumerate}
% subsection font_size (end)

% ============
% = Examples =
% ============
\subsection{Examples} % (fold)
\label{ssec:examples}

Let's have a look at a couple of examples:

\begin{itemize}
	\item Preparation of PhD thesis, in portuguese, with 11pt size and to be printed single sided (I wonder why one would do this!)\\
	\verb!\documentclass[prepphd,pt,11pt,oneside,latin1]{thesisdifctunl}!
	\item MSc dissertation, in english, with 12pt size and to be printed double sided\\
	\verb!\documentclass[msc,en,12pt,twoside,utf8]{thesisdifctunl}!
\end{itemize}
% subsection examples (end)

\section{How to Write Using \LaTeX} % (fold)
\label{sec:how_to_write_using_latex}

Please have a look at Chapter~\ref{cha:latex_examples}, where you may find many examples of \LaTeX constructs, such as Sectioning, inserting Figures and Tables, writing Equations, Theorems and algorithms, exhibit code listings, etc.

% section how_to_write_using_latex (end)
